//
// Created by yearing on 2021/6/18.
//

#include<iostream>

class Derived;

class Base {
public:
    void doFun() { fun(); }
private:
    virtual void fun() { std::cout << "Base Fun"; }
};

class Derived : public Base
{
private:
    virtual void fun() { std::cout << "Derived Fun"; }
};

int main()
{
    Base *ptr = new Derived;
    ptr->doFun();
    return 0;
}
